
Partial Class _Error
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If PreviousPage IsNot Nothing Then
            Dim ex As Exception = PreviousPage.Exception
            If ex.InnerException Is Nothing Then
                errout.InnerText = ex.Message
            Else
                errout.InnerText = ex.InnerException.Message & vbNewLine & ex.Message
            End If
        End If
    End Sub
End Class
